package com.feiyun.model.entity;

import java.time.LocalDateTime;
import javax.validation.constraints.PastOrPresent;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @ClassName Temp User Entity
 * @time 2023/03/12 17:25:22
 */
@Setter
@Getter
@ApiModel(value = "临时用户实体类", description = "定义临时用户的所有属性")
@TableName("t_wx_temp_user")
public class TempUser {
    @ApiModelProperty("用户唯一ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("uuid")
    @TableField
    private String uuid;

    @ApiModelProperty("微信id")
    @TableField
    private String wxId;

    @ApiModelProperty("用户微信昵称")
    @TableField
    @Length(max = 255, message = "微信昵称过长")
    private String nickname;

    @ApiModelProperty("创建时间")
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @PastOrPresent
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @PastOrPresent
    private LocalDateTime updateTime;

    private Integer count;

}